package org.embedchat.protocol;

public class Constants {

	/**
	 * Message header constants
	 */
	public static final int HEADER_COMMAND_ID_LENGTH = 2;
	public static final int HEADER_COMMAND_BODY_SIZE_LENGTH = 4;
	public static final int HEADER_LEN
		= HEADER_COMMAND_ID_LENGTH + HEADER_COMMAND_BODY_SIZE_LENGTH;

	/**
	 * Common messages constants
	 */
	public static final int TEXT_MESSAGE = 1;	
	/**
	 * Client messages constants
	 */
	public static final int LOGIN_MESSAGE = 201;
	public static final int ROOMS_LIST_REQUEST_MESSAGE = 202;
	
	/**
	 * Server messages constants
	 */
	public static final int ERROR_MESSAGE = 101;
	public static final int ROOMS_LIST_MESSAGE = 102;
	public static final int USERS_LIST_MESSAGE = 103;

	/**
	 * Some other constants
	 */
	public static final int RESULT = 0;
	public static final int RESULT_CODE_LEN = 2;
	public static final int RESULT_VALUE_LEN = 4;
	public static final int ADD_BODY_LEN = 4;
	public static final int RESULT_OK = 0;
	public static final int RESULT_ERROR = 1;

	private Constants() {
	}
}
